package com.syni.mdd.sjb.common.component.utils.feign.service.mddAll;

import com.syni.mdd.sjb.common.component.utils.common.utils.RpcResponseVo;
import com.syni.mdd.sjb.common.component.utils.feign.dto.mddAll.apiOrder.FindByOrderIdInDto;
import com.syni.mdd.sjb.common.component.utils.feign.dto.mddAll.apiOrder.GetByBusinessOrderForDataBankDto;
import com.syni.mdd.sjb.common.component.utils.feign.fallback.mddAll.OrderRestFallBackService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @className OrderRestService
 * @description TOO
 * @Author cfx
 * @DATE 2020/3/18 10:16
 * @VERSION 1.0
 **/
@FeignClient(value = "mdd-all",path = "/DSP_API",fallback = OrderRestFallBackService.class)
public interface OrderRestService extends MddAllRestService {
    @GetMapping("/apiOrder/timeToCancel")
    RpcResponseVo timeToCancel(@RequestParam("orderId") Integer orderId,
                               @RequestParam("cancelTime") String cancelTime);

    @PostMapping("/apiOrder/getByOrderIds")
    RpcResponseVo findByOrderIdIn(@RequestBody FindByOrderIdInDto findByOrderIdInDto);


    @PostMapping("/apiOrder/getByBusinessOrderForDataBank")
    RpcResponseVo getByBusinessOrderForDataBank(@RequestBody GetByBusinessOrderForDataBankDto getByBusinessOrderForDataBankDto);

}
